package com.hotlove.usercenter.dto;

/**
 * @Auther: hotlove_linx
 * @Date: 2022/4/26 22:39
 * @Description:
 */
public class Crendential {

    // 登录token
    private String token;

    // 用户id
    private Long profileId;

    // 用户名称
    private String profileName;

    // 用户地址
    private String address;

    // 邮箱账号
    private String email;

    // 手机账号
    private String phone;

    // 性别 0.男 1.女 2.同性
    private Integer sex;

    // 登录端 1.web 2.mobile 3.pc
    private Integer terminal;

    private Crendential(Builder builder) {
        this.token = builder.token;
        this.profileId = builder.profileId;
        this.profileName = builder.profileName;
        this.address = builder.address;
        this.email = builder.email;
        this.phone = builder.phone;
        this.sex = builder.sex;
        this.terminal = builder.terminal;
    }

    public String getToken() {
        return token;
    }

    public Long getProfileId() {
        return profileId;
    }

    public String getProfileName() {
        return profileName;
    }


    public String getAddress() {
        return address;
    }


    public String getEmail() {
        return email;
    }

    public String getPhone() {
        return phone;
    }

    public Integer getSex() {
        return sex;
    }

    public Integer getTerminal() {
        return terminal;
    }

    public static class Builder {
        // 登录token
        private String token;

        // 用户id
        private Long profileId;

        // 用户名称
        private String profileName;

        // 用户地址
        private String address;

        // 邮箱账号
        private String email;

        // 手机账号
        private String phone;

        // 性别 0.男 1.女 2.同性
        private Integer sex;

        // 登录端 1.web 2.mobile 3.pc
        private Integer terminal;

        public Builder token(String token) {
            this.token = token;
            return this;
        }

        public Builder id(Long profileId) {
            this.profileId = profileId;
            return this;
        }

        public Builder name(String profileName) {
            this.profileName = profileName;
            return this;
        }

        public Builder address(String address) {
            this.address = address;
            return this;
        }

        public Builder email(String email) {
            this.email = email;
            return this;
        }

        public Builder phone(String phone) {
            this.phone = phone;
            return this;
        }

        public Builder sex(Integer sex) {
            this.sex = sex;
            return this;
        }

        public Builder terminal(Integer terminal) {
            this.terminal = terminal;
            return this;
        }

        public Crendential build() {
            return new Crendential(this);
        }
    }
}
